package com.pubinfo.passbook.data.service;

import com.pubinfo.passbook.common.entity.TBankApplyReceipt;
import com.pubinfo.passbook.common.model.bo.bank.BankApplyReceipt;
import com.pubinfo.passbook.common.model.bo.bank.BankQueryReceipt;
import com.pubinfo.passbook.common.model.bo.bank.BankQueryReceiptDate;
import com.pubinfo.passbook.common.model.bo.bank.BankResult;
import com.pubinfo.passbook.common.model.dto.financial.InvoiceResult;

import java.io.IOException;
import java.text.ParseException;

public interface BankService {

    /**
     * 下载所有银行账号一段时间的银行回单
     * @param startDate
     * @param endDate
     * @return
     * @throws IOException
     * @throws ParseException
     */
    Boolean batchApplyReceipt(String startDate,String endDate) throws IOException, ParseException;

    /**
     * 申请银行回单
     * @param bankApplyReceipt
     * @return
     * @throws IOException
     */
    BankResult<String> applyReceipt(BankApplyReceipt bankApplyReceipt) throws IOException;

    /**
     * 查询银行单据
     * @param bankId
     * @return
     * @throws IOException
     */
    TBankApplyReceipt queryReceipt(String bankId) throws IOException;

    /**
     * 发起银行回单的请求
     * @return
     * @throws IOException
     */
    Boolean syncBankApplyReceipt() throws IOException;

    /**
     * 发起月对账单请求
     * @return
     * @throws IOException
     */
    Boolean syncBankReconciliationStatement() throws IOException;

    /**
     * 查询更新银行ofd的获取状态并解析保存可下载的ofd
     * @return
     * @throws Exception
     */
    Boolean syncBankQueryReceipt() throws Exception;
}
